package Mora;
/**
 * 裁判
 */

public class Show {


    String show() {

        final int CUT = 1; //布
        final int STONE = 2; //石头
        final int PACK = 3; //剪刀

        String fist = "";//判断谁胜，返回谁胜利

        Player player = new Player();//实例化玩家出拳
        int playQuan = player.player();//玩家的出拳

        Computer computer = new Computer();//实例化电脑出拳
        int comQuan = computer.computer();//电脑的出拳

        //1：布 2：石头 3：剪刀
        //如何判断谁赢了？？？？？怎么判断？？？？
        if(comQuan == playQuan){
            fist = "平局";
        }else if (playQuan == CUT && comQuan == PACK ||
                  playQuan == STONE && comQuan == CUT ||
                  playQuan == PACK && comQuan == STONE){
            fist = "电脑赢";
        }else {
            fist = "用户赢";
        }

        System.out.println(fist);

        return fist;
    }

}
